<template>
	<view >
		<block v-if="value.type == 'goodsSearch'">
			<view class="cu-bar search absolute w100" :class="'bg-'+theme" style="box-shadow: none;background-color: #ffffff!important;">
				<view class="text-center margin-left " :class="'text-'+theme_text" >
					
					<image src="../../static/red-new/logo.png" style="width: 119rpx;height: 49rpx;float: left;"></image>
					
				</view>
				<view class="search-form text-center align-center justify-center" :class="[value.config.bgstyle,'text-'+theme_text]"
				 @tap="goPage('/pages/shop/search')" style="margin-right: 20px;">
					<view class="iconfont icon-sousuo text-sm"></view>
					<view class="text-center margin-right">{{value.config.placeholder}}</view>
				</view>
				<!-- <view class="text-center margin-right" :class="'text-'+theme_text" @tap="goPage('/pages/member/notice/index')">
					<view class="iconfont icon-xiaoxi relative text-sm">
						<view class="cu-tag badge" v-if="nofity_num>0"></view>
					</view>
					<view class="text-xs">消息</view>
				</view> -->
			</view>
			<view class="empty-header"></view>
		</block>
		<block v-if="value.type == 'swiper'">
			<view class="margin-lr">
				<swiper class="screen-swiper square-dot" :indicator-dots="true" :circular="true" :autoplay="true" interval="5000"
				 duration="500" indicator-color="#8799a3" indicator-active-color="#ffe24e" style="height: 250upx;min-height: auto;"
				 @change="swuoerChannelHandle">
					<swiper-item v-for="(item, index) in value.config.items" :key="index" :class="'swiper-item'+swiperCur" @tap="goAdv(item.href)">
						<image :src="item.url" mode="aspectFit" class="radius10 default-view"></image>
					</swiper-item>
				</swiper>
			</view>
			<view style="margin:0 80rpx; box-shadow: 0 -8rpx 20rpx 2rpx rgba(100,100,100,0.7);"></view>
			<wholesaleTipModule ref="wholesaleTipModule"></wholesaleTipModule>
		</block>
		<block v-if="value.type == 'navigation'">
			<view style="background-color: #F5F5F5;" class="cu-list grid no-border category-view" :class="'col-'+value.config.num">
				<view style="background-color: #F5F5F5;" class="cu-item " v-for="(item,index) in value.config.items" :key="index" @tap="goAdv(item.href)">
					<image style="background-color: #F5F5F5;" class="cu-avatar lg margin-center bg-white" mode="aspectFit" :src="item.url"></image>
					<text class="text-black">{{item.name}}</text>
				</view>
			</view>
		</block>
		<block v-if="value.type == 'empty'">
			<view class="empty w100" :style="value.config.height?'height:'+value.config.height+'px;':''"></view>
		</block>
		<block v-if="value.type == 'notice'">
			<view class="bg-white space-between padding overflow">
				<image @tap="goPage('/pages/site/notice_list')" class="cu-avatar lg bg-white" src="https://gsconline-1251028293.cos.ap-guangzhou.myqcloud.com/images/2020/05/19/image_158987257198989955.png"
				 mode="aspectFill"></image>
				<view class="w100 margin-left overflow">
					<view v-for="(item,index) in value.config.items" :key="index" v-if="index<2" @tap="goArticle(item)" class="text-gray cuIcon-title text-cut li">{{item.title}}</view>
				</view>
			</view>
		</block>
		<block v-if="value.type == 'new_whole'">
			<view >
				<view class="bg-white" style="margin: 20rpx; border-radius: 20rpx;">
						<view class="cu-bar">
							<!-- <view class="action text-bold text-black m-title">
								<image src="../../static/red-new/fer.png" mode="widthFix" style="height: 37rpx;width: 162rpx;"></image>
							</view> -->
							<view class="action text-gray" @tap="goPage('/pages/shop/whole_list')">秒杀专区<view class="cuIcon-right cuIcon sm"></view>
							</view>
						</view>
						<view class="margin text-center">
							<view class="deadline-box" v-if=" value1 != null || value2 != null">
								<image src="../../static/now-z.png" mode="widthFix" style="width: 35rpx;height: 35rpx;top:6rpx"></image>
								<text v-if="value1 != null" >距开拼时间开始</text>
								<text v-if="value1 != null">
								<text class="djs-color" >{{value3.startday}}</text>天 
								<text class="djs-color">{{value3.starthou}}</text>时 
								<text class="djs-color">{{value3.startmin}}</text>分 
								<text class="djs-color">{{value3.startsec}}</text>秒
								</text>
								
								<text  v-if="value2 != null && value1 == null" >拼团结束倒计时</text>
								<text v-if="value1 == null && value2 != null">
									<text class="djs-color">{{value3.endday}}</text>天 
									<text class="djs-color">{{value3.endhou}}</text>时 
									<text class="djs-color">{{value3.endmin}}</text>分 
									<text class="djs-color">{{value3.endsec}}</text>秒
								</text>
								<text v-if="value2 == null ">已结束</text>
							</view>
						</view>
						
						<view class="list-box-1" >
							<view v-for="(item,index) in value.data" :key="index">
								<view class="goods-item-1" v-if="index < 2" @tap="goPage('/pages/shop/marketing/wholesale?id='+item.id)">
									<view class="thumb-box-1">
										<image style="border-radius: 5px;" class="thumb" :src="item.product.picture" mode="aspectFill"></image>
										<view class="clock-box-1" v-if="item.timeout > 0">
											<image src="@/static/icon-flash.png" mode="aspectFill"></image>
											<text><CountDown ref="CountDown" :value="item.timeout+''" :skin="'skin32'" v-if="item.timeout > 0"></CountDown></text>
										</view>
									</view>
									<view class="title">{{item.product.name}}</view>
									<view class="attr-1">
										<text>{{index+1}}号产品</text>
									</view>
									<view class="price-btn">
										<text class="price text-price">{{item.wholesale_price > 0 ? item.wholesale_price : item.product.price}}</text>
										<text class="btn">拼购<text class="cuIcon-right"></text></text>
									</view>
								</view>
							</view>
							
							<view class="more-1" @tap="goPage('/pages/shop/whole_list')">
								<view>查看更多</view>
							</view>
						</view>
						
					</view>
				</view>
		</block>
		<block v-if="value.type == 'new_whole1'">
			<view>
				<view class="cu-bar">
					<!-- @tap="goPage('/pages/shop/auto_goods')" -->
					<!-- @tap="goPage('/pages/shop/auto_goods')" -->
					<view class="action text-bold text-black m-title">开团礼包<text class="margin-left-sm text-sm text-gray">精选全球良品品牌</text></view>
					<view class="action text-gray" @tap="goPage('/pages/shop/auto_goods')">查看更多<view class="cuIcon-right cuIcon sm"></view>
					</view>
				</view>
				
				<view class="list-box-2">
					<image class="lb-bg" src="@/static/lb-bg.png"></image>
					<view class="list-box-2-content">
						<view class="top-box-2" @tap="goPage('/pages/shop/auto_goods')">
							<!-- <image src="@/static/my-logo-1.png"></image>
							<text>进入开团专场</text> -->
						</view>
						
						<swiper class="my-swiper" autoplay='true' indicator-dots='true' indicator-active-color="A80002" circular='true'>
							<swiper-item>
								<view class="swiper-item-box">
									<block v-for="(item,index) in value.data" :key="index" v-if="index<3">
										<view class="one-goods" @tap="goPage('/pages/shop/marketing/seven_wholesale?id='+item.id)">
											<image :src="item.product.picture" mode="aspectFill"></image>
											<view class="one-goods-title"><text class="t-red text-price">{{item.wholesale_price > 0 ? item.wholesale_price : item.product.price}}</text><text class="t-gray text-price">{{item.product.price}}</text></view>
											<view class="one-goods-btn">立即开团</view>
										</view>
									</block>
								</view>
							</swiper-item>
							<swiper-item v-if="value.data.length>3">
								<view class="swiper-item-box">
									<block v-for="(item,index) in value.data" :key="index" v-if="index>2 && index<6">
										<view class="one-goods" @tap="goPage('/pages/shop/marketing/seven_wholesale?id='+item.id)">
											<image :src="item.product.picture" mode="aspectFill"></image>
											<view class="one-goods-title"><text class="t-red text-price">{{item.wholesale_price > 0 ? item.wholesale_price : item.product.price}}</text><text class="t-gray text-price">{{item.product.price}}</text></view>
											<view class="one-goods-btn">立即开团</view>
										</view>
									</block>
								</view>
							</swiper-item>
							<swiper-item v-if="value.data.length>6">
								<view class="swiper-item-box">
									<block v-for="(item,index) in value.data" :key="index" v-if="index>5 && index<9">
										<view class="one-goods" @tap="goPage('/pages/shop/marketing/seven_wholesale?id='+item.id)">
											<image :src="item.product.picture" mode="aspectFill"></image>
											<view class="one-goods-title"><text class="t-red text-price">{{item.wholesale_price > 0 ? item.wholesale_price : item.product.price}}</text><text class="t-gray text-price">{{item.product.price}}</text></view>
											<view class="one-goods-btn">立即开团</view>
										</view>
									</block>
								</view>
							</swiper-item>
							<swiper-item v-if="value.data.length>9">
								<view class="swiper-item-box">
									<block v-for="(item,index) in value.data" :key="index" v-if="index>8 && index<12">
										<view class="one-goods" @tap="goPage('/pages/shop/marketing/seven_wholesale?id='+item.id)">
											<image :src="item.product.picture" mode="aspectFill"></image>
											<view class="one-goods-title"><text class="t-red text-price">{{item.wholesale_price > 0 ? item.wholesale_price : item.product.price}}</text><text class="t-gray text-price">{{item.product.price}}</text></view>
											<view class="one-goods-btn">立即开团</view>
										</view>
									</block>
								</view>
							</swiper-item>
							
							<!-- <swiper-item>
								<view class="swiper-item-box">
									<view class="one-goods">
										<image src="@/static/ypyp.jpg" mode="aspectFill"></image>
										<view class="one-goods-title"><text class="t-red text-price">398</text><text class="t-gray text-price">998</text></view>
										<view class="one-goods-btn">立即开团</view>
									</view>
									<view class="one-goods">
										<image src="@/static/ypyp.jpg" mode="aspectFill"></image>
										<view class="one-goods-title"><text class="t-red text-price">398</text><text class="t-gray text-price">998</text></view>
										<view class="one-goods-btn">立即开团</view>
									</view>
									<view class="one-goods">
										<image src="@/static/ypyp.jpg" mode="aspectFill"></image>
										<view class="one-goods-title"><text class="t-red text-price">398</text><text class="t-gray text-price">998</text></view>
										<view class="one-goods-btn">立即开团</view>
									</view>
								</view>
							</swiper-item> -->
							<!-- <swiper-item>
								<view class="swiper-item-box">
									<view class="one-goods">
										<image src="@/static/ypyp.jpg" mode="aspectFill"></image>
										<view class="one-goods-title"><text class="t-red text-price">398</text><text class="t-gray text-price">998</text></view>
										<view class="one-goods-btn">立即开团</view>
									</view>
									<view class="one-goods">
										<image src="@/static/ypyp.jpg" mode="aspectFill"></image>
										<view class="one-goods-title"><text class="t-red text-price">398</text><text class="t-gray text-price">998</text></view>
										<view class="one-goods-btn">立即开团</view>
									</view>
									<view class="one-goods">
										<image src="@/static/ypyp.jpg" mode="aspectFill"></image>
										<view class="one-goods-title"><text class="t-red text-price">398</text><text class="t-gray text-price">998</text></view>
										<view class="one-goods-btn">立即开团</view>
									</view>
								</view>
							</swiper-item> -->
						</swiper>
						
					</view>
				</view>
			</view>
		</block>
		<block v-if="value.type == 'goodsList'">
			
			<view class="cu-bar " v-if="value.config.name">
				<view class="action text-bold text-black m-title">{{value.config.name}} 
				<!-- <text style="color: #818181!important;font-size: 12px;margin-left: 10px;">专享精品免费领</text> -->
				</view>
				<view class="action text-gray" v-if="value.config.more && value.config.more==1 && value.config.name == 'VIP专区'" @tap="goPage('/pages/shop/vip_list')">查看更多<view class="cuIcon-right cuIcon sm"></view>
				
				</view>
				<view class="action text-gray" v-if="value.config.more && value.config.more==1 && value.config.name != 'VIP专区'" @tap="goGoodsList(value)">查看更多<view class="cuIcon-right cuIcon sm"></view>
				</view>
			</view>
			<view class="">
				<block v-if="value.config.type=='swiper'&&value.config.name!='VIP专区'">
					<view class="margin-lr-sm">
						<swiper class="screen-swiper square-dot" :indicator-dots="false" :circular="true" :autoplay="true" interval="5000"
						 duration="500" indicator-color="#8799a3" indicator-active-color="#0081ff" :display-multiple-items="value.config.column_num"
						 @change="swuoerChannelHandle" :style="'height:' + swiperHeight">
							<swiper-item v-for="(item, index) in value.data.goodslist" :key="index" :class="'swiper-item'+swiperCur">
								<goodsView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num+''"></goodsView>
							</swiper-item>
						</swiper>
					</view>
				</block>
				<block v-else-if="value.config.type=='map'">
					<view class="grid" :class="'col-'+value.config.column_num">
						<view v-for="(item,index) in value.data.goodslist" :key="index">
							<goodsView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num+''"></goodsView>
						</view>
					</view>
				</block>
				<block v-else-if="value.config.type=='swiper'&&value.config.name=='VIP专区'">
					<swiper class="vip-swiper" autoplay='true' indicator-dots='true' circular='true' indicator-color="#EDEDED" indicator-active-color="#ffe24e">
						<swiper-item class="vip-swiper-item">
							<view class="grid" :class="'col-'+value.config.column_num">
								<block v-for="(item,index) in value.data.goodslist" :key="index" v-if="index<6">
									<goodsView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num+''" :is_vip="value.config.name=='VIP专区'"></goodsView>
								</block>
							</view>
						</swiper-item>
						<swiper-item class="vip-swiper-item" v-if="value.data.goodslist.length>6">
							<view class="grid" :class="'col-'+value.config.column_num">
								<block v-for="(item,index) in value.data.goodslist" :key="index" v-if="index>5 && index<12">
									<goodsView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num+''" :is_vip="value.config.name=='VIP专区'"></goodsView>
								</block>
							</view>
						</swiper-item>
						<swiper-item class="vip-swiper-item" v-if="value.data.goodslist.length>12">
							<view class="grid" :class="'col-'+value.config.column_num">
								<block v-for="(item,index) in value.data.goodslist" :key="index" v-if="index>11 && index<18">
									<goodsView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num+''" :is_vip="value.config.name=='VIP专区'"></goodsView>
								</block>
							</view>
						</swiper-item>
						<swiper-item class="vip-swiper-item" v-if="value.data.goodslist.length>18">
							<view class="grid" :class="'col-'+value.config.column_num">
								<block v-for="(item,index) in value.data.goodslist" :key="index" v-if="index>17 && index<24">
									<goodsView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num+''" :is_vip="value.config.name=='VIP专区'"></goodsView>
								</block>
							</view>
						</swiper-item>
					</swiper>
				</block>
				<block v-else>
					<view style="margin-left: 5px;margin-right: 5px;border-radius: 15px;" class="grid bg-white" :class="'col-'+value.config.column_num">
						<block v-for="(item,index) in value.data.goodslist" :key="index">
							<goodsView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num+''" :is_vip="value.config.name=='VIP专区'"></goodsView>
						</block>
					</view>
				</block>
			</view>
		</block>
		<block v-if="value.type == 'image'">
			<view class="" @tap="goAdv(value.config.href)">
				<image :src="value.config.url" mode="widthFix" class="w100"></image>
			</view>
		</block>
		<block v-if="value.type == 'images'">
			<view class="" v-if="value.config.type==4">
				<view class="grid col-2">
					<view class="" @tap="goAdv(value.config.items[0].href)">
						<image :src="value.config.items[0].url" mode="widthFix"></image>
					</view>
					<view>
						<view class="" @tap="goAdv(value.config.items[1].href)">
							<image :src="value.config.items[1].url" mode="widthFix"></image>
						</view>
						<view class="grid col-2">
							<view @tap="goAdv(value.config.items[2].href)">
								<image :src="value.config.items[2].url" mode="widthFix"></image>
							</view>
							<view @tap="goAdv(value.config.items[3].href)">
								<image :src="value.config.items[3].url" mode="widthFix"></image>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view v-else>
				<view class="grid" :class="'col-'+(parseInt(value.config.type)+1)">
					<view class="" v-for="(item,index) in value.config.items" :key="index" @tap="goAdv(item.href)">
						<image :src="item.url" mode="widthFix"></image>
					</view>
				</view>
			</view>
		</block>
		<block v-if="value.type == 'video'">
			<view class="">
				<video :src="value.config.url" :poster="value.config.thumb" class="w100 fitcover" object-fit="cover" loop="true"
				 autoplay="true"></video>
			</view>
		</block>
		<block v-if="value.type == 'text'">
			<view class="">
				<rich-text :nodes="value.config.content"></rich-text>
			</view>
		</block>
		<block v-if="value.type == 'goodsRush'">
			<block v-if="value.data.rush">
				<view class="cu-bar bg-white" v-if="value.config.name">
					<view class="action  text-black m-title  w100 overflow flex-start">
						<text class="margin-right-sm text-bold">{{value.config.name}}</text>
						<CountDown :value="value.data.rush.end_time" :skin="'skin1'"></CountDown>
					</view>
					<view class="action text-gray overflow  flex-start " v-if="value.config.more && value.config.more==1" style="min-width: 160rpx;" @tap="goPage('/pages/shop/marketing/discount')">
						查看更多<text class="cuIcon-right cuIcon sm"></text>
					</view>
				</view>
				<view class=" bg-white padding-lr padding-bottom">
					<view class="shadow-warp padding-xs">
						<swiper class=" square-dot " :indicator-dots="false" :circular="true" :autoplay="true" interval="5000" duration="500"
						 indicator-color="#8799a3" indicator-active-color="#0081ff" :display-multiple-items="value.config.column_num-1"
						 @change="swuoerChannelHandle" :style="'height:' + swiperHeight" :next-margin="value.data.rush.discountProduct.length > 1?'80px':'0px'">
							<swiper-item v-for="(item, index) in value.data.rush.discountProduct" :key="index" :class="'swiper-item'+swiperCur">
								<goodsView :value="item" :stype="'rush'" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num"></goodsView>
							</swiper-item>
						</swiper>
					</view>
				</view>
			</block>
		</block>
		<block v-if="value.type == 'goodsLive'">
			<view class="cu-bar bg-white" v-if="value.config.name">
				<view class="action text-bold text-black m-title">
					<!-- {{value.config.name}} -->
					<!-- <image src="../../static/h-yp.png" style="width: 75px;" mode="widthFix"></image> -->
				</view>
				<view class="action text-gray" v-if="value.config.more && value.config.more==1" @tap="goPage('/pages/shop/live/index')" style="line-height: 16px;">查看更多<view class="cuIcon-right cuIcon sm"></view>
				</view>
			</view>
			
			<view class="bg-white" v-if="value.config.type==3">
				<view class="grid col-2 padding-lr-sm">
					<view class="">
						<LiveView :value="value.data.list[0]" :col="'1'" :indexvalue="'1'" v-if="value.data.list[0]"></LiveView>
						<LiveView :value="value.data.list[2]" :col="'1'" :indexvalue="'3'" v-if="value.data.list[2]"></LiveView>
					</view>
					<view class="">
						<LiveView :value="value.data.list[1]" :col="'1'" :indexvalue="'2'" v-if="value.data.list[1]"></LiveView>
						<LiveView :value="value.data.list[3]" :col="'1'" :indexvalue="'4'" v-if="value.data.list[3]"></LiveView>
					</view>
				</view>
			</view>
			<view class="bg-white" v-else>
				<!-- <view class="deadline-box" v-if=" value1 != null || value2 != null">
					
					<text v-if="value1 != null" >距开拼时间开始</text>
					<text v-if="value1 != null">
					<text class="djs-color" >{{value3.startday}}</text>天 
					<text class="djs-color">{{value3.starthou}}</text>时 
					<text class="djs-color">{{value3.startmin}}</text>分 
					<text class="djs-color">{{value3.startsec}}</text>秒
					</text>
					
					<text  v-if="value2 != null && value1 == null" >拼团结束倒计时</text>
					<text v-if="value1 == null && value2 != null">
						<text class="djs-color">{{value3.endday}}</text>天 
						<text class="djs-color">{{value3.endhou}}</text>时 
						<text class="djs-color">{{value3.endmin}}</text>分 
						<text class="djs-color">{{value3.endsec}}</text>秒
					</text>
					<text v-if="value2 == null ">已结束</text>
				</view> -->
				<!-- <view class="margin-lr-sm"> -->
					<!-- <swiper class="screen-swiper square-dot" :indicator-dots="false" :circular="true" :autoplay="true" interval="5000"
					 duration="500" indicator-color="#8799a3" indicator-active-color="#0081ff" :display-multiple-items="value.config.type"
					 @change="swuoerChannelHandle" :style="'height:' + swiperHeight">
						<swiper-item v-for="(item, index) in value.data.list" :key="index" :class="'swiper-item'+swiperCur">
							<LiveView :value="item" :col="value.config.type"></LiveView>
						</swiper-item>
					</swiper> -->
					<view class="liveplay-box">
						<scroll-view scroll-x >
							<view class="liveplayer-list" >
								<view class="liveplayer" v-for="(item, index) in value.data.list" :key="index">
									<view class="cover-box" @tap="goPage('/pages/shop/live/live?id=' + item.id)">
										<image class="cover" :src="item.thumb"></image>
										<view class="status">
											<image src="../../static/live-icon.png"></image>
											<text v-if="item.stream_status == 1">正在直播</text>
											<text v-if="item.stream_status == 0">未开播</text>
											<text v-if="item.stream_status == 2">已结束</text>
										</view>
									</view>
									<view class="title">{{item.desc}}</view>
									<view class="attr">
										<text class="bg-yellow">{{item.title}}</text>
										<!-- <text class="red-round">99元拼区</text> -->
									</view>
									<view class="live-btn">
										<view class="bg-yellow" style="background-color: #ffe24e;color: #000000;">去看直播<text class="cuIcon-right"></text></view>
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
				<!-- </view> -->
			</view>
		</block>
		
		<block v-if="value.type == 'wholesale'">
			<view class="cu-bar bg-white margin-top-sm margin-bottom-sm" v-if="value.config.name" style="width: 95%;
    margin: 0 auto;
    margin-top: 10px;
    margin-bottom: 10px;">
				<view class="action text-bold text-black m-title">{{value.config.name}} <text style="color: #818181!important;font-size: 12px;margin-left: 10px;">精选全球良品品牌</text></view>
				<view class="action text-gray" v-if="value.config.more && value.config.more==1" @tap="goPage('/pages/shop/marketing/wholesale_list')">查看更多<view class="cuIcon-right cuIcon sm"></view>
				</view>
			</view>
			
			<view class="" style="background-color: #F5F5F5;">
				<block v-if="value.config.type=='swiper'">
					<view class="margin-lr-sm">
						<swiper class="screen-swiper square-dot" :indicator-dots="false" :circular="true" :autoplay="true" interval="5000"
						 duration="500" indicator-color="#8799a3" indicator-active-color="#0081ff" :display-multiple-items="value.config.column_num"
						 @change="swuoerChannelHandle" :style="'height:' + swiperHeight">
							<swiper-item v-for="(item, index) in value.data.list" :key="index" :class="'swiper-item'+swiperCur">
								<wholesaleView :value="item" :stype="'swiper'" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num"></wholesaleView>
							</swiper-item>
						</swiper>
					</view>
				</block>
				<block v-else>
					<view class="grid" :class="value.config.type=='map'?('col-'+value.config.column_num):'col-1'">
						<view v-for="(item,index) in value.data.list" :key="index">
							<wholesaleView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num"></wholesaleView>
						</view>
					</view>
				</block>
				
			</view>
			<view style="margin-left: 15px;margin-right: 15px;text-align: center;margin: 0 auto;width: 50%;">
				
				<image src="../../static/icon-logo.png" style="width: 60rpx;height: 60rpx;float: left;">
					
				</image> <text style="display: block;line-height: 31px;">粤ICP备2021013948号</text>
			</view>
			
		</block>
		<block v-if="value.type == 'collegeSearch'">
			<view class="cu-bar search absolute w100" :class="'bg-'+theme" style="box-shadow: none;">
				<view class="text-center margin-left " :class="'text-'+theme_text" @tap="goPage('/pages/shop/category')">
					<view class="iconfont icon-fenlei text-sm"></view>
					<view class="text-xs">分类</view>
				</view>
				<view class="search-form text-center align-center justify-center" :class="[value.config.bgstyle,'text-'+theme_text]"
				 @tap="goPage('/pages/shop/search')">
					<view class="iconfont icon-sousuo text-sm"></view>
					<view class="text-center margin-right">{{value.config.placeholder}}</view>
				</view>
				<view class="text-center margin-right" :class="'text-'+theme_text" @tap="goPage('/pages/member/notice/index')">
					<view class="iconfont icon-xiaoxi relative text-sm">
						<view class="cu-tag badge" v-if="nofity_num>0"></view>
					</view>
					<view class="text-xs">消息</view>
				</view>
			</view>
			<view class="empty-header"></view>
		</block>
		<block v-if="value.type == 'liveList'">
			<view class="cu-bar bg-white" v-if="value.config.name">
				<view class="action text-bold text-black m-title">{{value.config.name}}</view>
				<view class="action text-gray" v-if="value.config.more && value.config.more==1" @tap="goPage('/collegePackages/pages/college/live/list')">查看更多<view class="cuIcon-right cuIcon sm"></view>
				</view>
			</view>
			<view class="bg-white" v-if="value.config.type==3">
				<view class="grid col-2 padding-lr-sm">
					<view class="">
						<LiveView :value="value.data.list[0]" :col="'1'" :indexvalue="'1'" v-if="value.data.list[0]"></LiveView>
						<LiveView :value="value.data.list[2]" :col="'1'" :indexvalue="'3'" v-if="value.data.list[2]"></LiveView>
					</view>
					<view class="">
						<LiveView :value="value.data.list[1]" :col="'1'" :indexvalue="'2'" v-if="value.data.list[1]"></LiveView>
						<LiveView :value="value.data.list[3]" :col="'1'" :indexvalue="'4'" v-if="value.data.list[3]"></LiveView>
					</view>
				</view>
			</view>
			<view class="bg-white" v-else>
				<view class="margin-lr-sm">
					<swiper class="screen-swiper square-dot" :indicator-dots="false" :circular="true" :autoplay="true" interval="5000"
					 duration="500" indicator-color="#8799a3" indicator-active-color="#0081ff" :display-multiple-items="value.config.type"
					 @change="swuoerChannelHandle" :style="'height:' + swiperHeight">
						<swiper-item v-for="(item, index) in value.data.list" :key="index" :class="'swiper-item'+swiperCur">
							<LiveView :value="item" :col="value.config.type"></LiveView>
						</swiper-item>
					</swiper>
				</view>
			</view>
		</block>
		<block v-if="value.type == 'videoList'">
			<view class="cu-bar " v-if="value.config.name">
				<view class="action text-bold text-black m-title">{{value.config.name}}</view>
				<view class="action text-gray" v-if="value.config.more && value.config.more==1" @tap="goPage('/collegePackages/pages/college/video/list')">查看更多<view class="cuIcon-right cuIcon sm"></view>
				</view>
			</view>
			<view class="">
				<block v-if="value.config.type=='swiper'">
					<view class="margin-lr-sm">
						<swiper class="screen-swiper square-dot" :indicator-dots="false" :circular="true" :autoplay="true" interval="5000"
						 duration="500" indicator-color="#8799a3" indicator-active-color="#0081ff" :display-multiple-items="value.config.column_num"
						 @change="swuoerChannelHandle" :style="'height:' + swiperHeight">
							<swiper-item v-for="(item, index) in value.data.list" :key="index" :class="'swiper-item'+swiperCur">
								<videoView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num"></videoView>
							</swiper-item>
						</swiper>
					</view>
				</block>
				<block v-else>
					<view class="grid" :class="value.config.type=='map'?('col-'+value.config.column_num):'col-1'">
						<view v-for="(item,index) in value.data.list" :key="index">
							<videoView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num"></videoView>
						</view>
					</view>
				</block>
			</view>
		</block>
		<block v-if="value.type == 'courseList'">
			<view class="cu-bar bg-white" v-if="value.config.name">
				<view class="action text-bold text-black m-title">{{value.config.name}}</view>
				<view class="action text-gray" v-if="value.config.more && value.config.more==1" @tap="goPage('/collegePackages/pages/college/course/list')">查看更多<view class="cuIcon-right cuIcon sm"></view>
				</view>
			</view>
			<view class="bg-white">
				<block v-if="value.config.type=='swiper'">
					<view class="margin-lr-sm">
						<swiper class="screen-swiper square-dot" :indicator-dots="false" :circular="true" :autoplay="true" interval="5000"
						 duration="500" indicator-color="#8799a3" indicator-active-color="#0081ff" :display-multiple-items="value.config.column_num"
						 @change="swuoerChannelHandle" :style="'height:' + swiperHeight">
							<swiper-item v-for="(item, index) in value.data.list" :key="index" :class="'swiper-item'+swiperCur">
								<courseView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num"></courseView>
							</swiper-item>
						</swiper>
					</view>
				</block>
				<block v-else>
					<view class="grid" :class="value.config.type=='map'?('col-'+value.config.column_num):'col-1'">
						<view v-for="(item,index) in value.data.list" :key="index">
							<courseView :value="item" :stype="value.config.type" :indexvalue="index%value.config.column_num+''" :col="value.config.column_num"></courseView>
						</view>
					</view>
				</block>
			</view>
		</block>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex'

	import wholesaleTipModule from '@/components/page/wholesaleTipModule.vue'
	import courseView from '@/components/college/courseView.vue'
	import videoView from '@/components/college/videoView.vue'
	import goodsView from '@/components/shop/goodsView.vue'
	import wholesaleView from '@/components/shop/wholesaleView.vue'
	import LiveView from '@/components/shop/LiveView.vue'
	import CountDown from '@/components/default/CountDown.vue'
	export default {
		components: {
			courseView,
			videoView,
			wholesaleView,
			goodsView,
			LiveView,
			CountDown,
			wholesaleTipModule
		},
		computed: mapState(['forcedLogin', 'hasLogin']),
		props: {
			value: {
				type: Object,
				default: null
			},
			value1: {
				type:String,
				default: null
			},
			value2: {
				type:String,
				default: null
			},
			value3: {
				type: Object,
				default: null
			}
		},
		created: function(e) {
			if (this.value.type == 'goodsRush') {
				this.swiperBottom = 0

				// #ifdef MP-WEIXIN
				this.swiperHeight = '280px'
				// #endif
				// #ifdef H5
				this.mathSwiperDefaultHeight()
				// #endif
			}

			setTimeout((r) => {
				this.mathSwiperHeight()
			}, 500)
			if (this.value.type == 'goodsSearch') {
				if (this.hasLogin) {
					this.$common.getNotifyNum().then((num) => {
						this.nofity_num = parseInt(num.announce_count) + parseInt(num.remind_count)
					})
				}
			}
			if (this.value.type == 'swiper') {
				this.$nextTick(() => {
					if (this.$refs.wholesaleTipModule) {
						this.$refs.wholesaleTipModule.updateset()
					}
				})
			}
		},
		data() {
			return {
				cardCur: 0,
				swiperHeight: '260px',
				swiperCur: 0,
				swiperBottom: 20,
				nofity_num: 0,
				theme: this.$config.THEME(),
				theme_text: this.$config.THEME_TEXT(),
			}
		},
		methods: {
			
			updateset() {
				this.theme = this.$config.THEME()
				this.theme_text = this.$config.THEME_TEXT()
			},
			mathSwiperDefaultHeight() {
				this.mathElementWH('.index0').then((s) => {
					this.swiperHeight = parseInt(s[0].height) + this.swiperBottom + 'px'
				}).catch((e) => {
					setTimeout((r) => {
						this.mathSwiperDefaultHeight()
					}, 300)
				})
			},
			mathSwiperHeight() {
				this.$nextTick((r) => {
					this.mathElementWH('.swiper-item' + this.swiperCur + ' .default-view').then((s) => {
						this.swiperHeight = parseInt(s[0].height) + this.swiperBottom + 'px'
					}).catch((e) => {})
				})
			},
			swuoerChannelHandle(e) {
				this.swiperCur = e.detail.current
				this.$nextTick((r) => {
					this.mathSwiperHeight()
				})
			},
			mathElementWH(element) {
				return new Promise((resolve, reject) => {
					let query = uni.createSelectorQuery().in(this);
					query.select(element).boundingClientRect();
					query.exec((res) => {
						if (res)
							resolve(res)
						else reject(res)
					})
				})
			},
			goAdv(href) {
				if(href=='/' || href==''){
					// this.$common.showError('敬请期待')
					return false
				}
				if (href) {
					if (href.slice(0, 4) == 'http') {
						// #ifdef APP-VUE
						plus.runtime.openURL(href, (r) => {

						})
						// #endif

						// #ifndef APP-VUE
						window.location.href = href
						// #endif
					} else {
						uni.navigateTo({
							url: href
						})
					}
				}
			},
			goArticle(item) {
				uni.navigateTo({
					url: '/pages/site/article_detail?id=' + item.id
				})
			},
			goGoodsList(item) {
				uni.navigateTo({
					url: "/pages/shop/list?page_item_id=" + item.id + "&title=" + item.config.name
				})
			},
			cardSwiper(e) {
				this.cardCur = e.detail.current
			},
			
			
		},
	}
</script>

<style>
	
	.djs-color{
		background-color: red!important;
		color: #ffffff!important;
		padding: 2px!important;
	}
	.card-swiper uni-swiper-item,
	.card-swiper swiper-item {
		padding: 0 !important;
	}

	.radius10 {
		border-radius: 20rpx;
	}

	.flex-start {
		justify-content: flex-start;
	}
	
	 .deadline-box{
		/* margin-top: 15rpx; */
		text-align: center;
		font-size: 22rpx;
		color: #999999;
		white-space: nowrap;
		/* height: 40px; */
	}
	 .deadline-box text{
		margin: 0 2rpx;
		font-size: 30rpx;
		width: 27rpx;
		height: 27rpx;
		text-align: center;
		line-height: 48rpx;
		color: rgb(153, 153, 153);
		background: none;
	}
</style>

<style>
	.liveplay-box{
		margin: 20rpx 25rpx 0;
		padding: 22rpx 24rpx;
		background: #FFFFFF;
		border-radius: 10rpx;
	}
	.liveplay-box .topic-line{
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.topic-line image{
		width: 137rpx;
		height: 32rpx;
	}
	.topic-line .more{
		font-size: 30rpx;
		color: #666666;
	}
	.liveplay-box .zone-time{
		margin-top: 25rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
	}
	.zone-time .item{
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.zone-time .item .time{
		font-size: 30rpx;
		color: #999999;
	}
	.zone-time .item .zone{
		margin-left: 20rpx;
		width: 100rpx;
		height: 40rpx;
		border-radius: 20rpx;
		background-color: #FFE24D;
		font-size: 22rpx;
		color: #000000;
		line-height: 40rpx;
		text-align: center;
	}
	.liveplay-box .deadline-box{
		margin-top: 15rpx;
		text-align: center;
		font-size: 22rpx;
		color: #999999;
		white-space: nowrap;
	}
	.liveplay-box .deadline-box text{
		margin: 0 2rpx;
		font-size: 16rpx;
		width: 27rpx;
		height: 27rpx;
		text-align: center;
		line-height: 27rpx;
		color: #FFFFFF;
		background-color: #CC0000;
	}
	.liveplay-box .liveplayer-list{
		margin-top: 40rpx;
		width: 100%;
		display: flex;
		align-items: center;
	}
	.liveplayer-list .liveplayer{
		width: 256rpx;
		padding: 18rpx;
		border-top: 2rpx #999999 solid;
		border-right: 2rpx #999999 solid;
	}
	.liveplayer-list .liveplayer:last-child{
		border-right: none;
	}
	.liveplayer .cover-box{
		width: 220rpx;
		height: 220rpx;
		position: relative;
	}
	.cover-box .cover{
		width: 100%;
		height: 100%;
		border-radius: 10rpx;
	}
	.cover-box .status{
		position: absolute;
		top: 10rpx;
		left: 14rpx;
		width: 140rpx;
		height: 38rpx;
		background-color: #FFFFFF;
		border-radius: 19rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
	}
	.cover-box .status image{
		width: 20rpx;
		height: 20rpx;
	}
	.cover-box .status text{
		font-size: 24rpx;
		color: #CC0000;
	}
	.liveplayer .title{
		width: 100%;
		text-align: center;
		font-size: 22rpx;
		color: #CCCCCC;
		line-height: 45rpx;
		overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap;
	}
	.liveplayer .attr{
		display: flex;
		justify-content: space-around;
		align-items: center;
		overflow: hidden;
	}
	.liveplayer .attr text{
		padding: 3rpx 8rpx;
		border-radius: 5rpx;
		font-size: 16rpx;
		white-space: nowrap;
	}
	.liveplayer .attr .red-bg{
		background-color: #CC0000;
		color: #FFFFFF;
		border: 1rpx #CC0000 solid;
	}
	.liveplayer .attr .red-round{
		background-color: #FFFFFF;
		color: #CC0000;
		border: 1rpx #CC0000 solid;
	}
	.liveplayer .live-btn{
		margin-top: 10rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.liveplayer .live-btn view{
		border-radius: 10rpx;
		padding: 4rpx 18rpx;
		font-size: 22rpx;
		color: #FFFFFF;
		background-color: #CC0000;
	}
</style>

<style>
	.list-box-1{
		background-image: url(../../static/red/lin-bg.png);
		border-top: 1rpx #F2F2F2 solid;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.list-box-1 .goods-item-1{
		width: 300rpx;
		padding: 20rpx;
		border-right: 1rpx solid #F2F2F2;
	}
	.list-box-1 .goods-item-1 .thumb-box-1{
		width: 260rpx;
		height: 260rpx;
		border: 1rpx solid #f5f5f5;
		border-radius: 8rpx;
		position: relative;
	}
	.list-box-1 .thumb-box-1 .thumb{
		width: 100%;
		height: 100%;
	}
	.thumb-box-1 .clock-box-1{
		position: absolute;
		top: 6rpx;
		left: 8rpx;
		width: 150rpx;
		height: 40rpx;
		border-radius: 20rpx;
		background-color: #FFFFFF;
		border: 1rpx solid #f5f5f5;
		display: flex;
		justify-content: space-around;
		align-items: center;
	}
	.clock-box-1 image{
		width: 20rpx;
		height: 20rpx;
	}.clock-box-1 text{
		font-size: 24rpx;
		color: #E96060;
	}
	.goods-item-1 .title{
		width: 100%;
		margin-top: 10rpx;
		font-size: 28rpx;
		color: #000000;
		font-weight: bold;
		overflow: hidden;    
		text-overflow:ellipsis;    
		white-space: nowrap;
	}
	.goods-item-1 .attr-1{
		margin-top: 20rpx;
		display: flex;
		align-items: center;
	}
	.attr-1 text{
		background-color: #FF3220;
		padding: 6rpx 12rpx;
		border-radius: 6rpx;
		margin-right: 10rpx;
		color: #FFFFFF;
		font-size: 19rpx;
	}
	.goods-item-1 .price-btn{
		margin-top: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.price-btn .price{
		color: #FF3220;
		font-size: 34rpx;
	}
	.price-btn .btn{
		width: 86rpx;
		height: 40rpx;
		background-color: #FF3220;
		border-radius: 20rpx;
		text-align: center;
		line-height: 40rpx;
		color: #FFFFFF;
		font-size: 28rpx;
	}
	
	.list-box-1 .more-1{
		flex: 1;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.more-1 view{
		width: 40rpx;
		line-height: 50rpx;
		font-size: 34rpx;
		color: #999999;
	}
</style>

<style>
	.list-box-2{
		margin: 0 20rpx 0;
		width: 710rpx;
		height: 490rpx;
		position: relative;
	}
	.list-box-2 .lb-bg{
		width: 100%;
		height: 100%;
	}
	.list-box-2 .list-box-2-content{
		width: 710rpx;
		height: 490rpx;
		position: absolute;
		top: 0;
		left: 0;
		padding: 26rpx;
	}
	.list-box-2-content .top-box-2{
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.top-box-2 image{
		margin-left: 20rpx;
		width: 120rpx;
		height: 60rpx;
	}
	.top-box-2 text{
		margin-right: 10rpx;
		width: 214rpx;
		height: 56rpx;
		line-height: 56rpx;
		border-radius: 16rpx;
		background-color: #FFFFFF;
		color: #A08622;
		font-size: 30rpx;
		font-weight: bold;
		text-align: center;
	}
		
	.list-box-2-content .my-swiper{
		margin-top: 30rpx;
		height: 374rpx;
	}
	.my-swiper .swiper-item-box{
		display: flex;
		/* justify-content: space-between; */
		align-items: center;
	}
	.swiper-item-box .one-goods{
		width: 208rpx;
		height: 310rpx;
		border: 1rpx solid #F5F5F5;
		display: flex;
		flex-direction: column;
		align-items: center;
		background-color: #ffffff;
		margin-right: 20rpx;
		border-radius: 15px 15px 0 0;
	}
	.swiper-item-box .one-goods:nth-child(3n){
		
		margin-right: 0;
	}
	.one-goods image{
		width: 208rpx;
		height: 208rpx;
		border-radius: 15px;
	}
	.one-goods .one-goods-title{
		width: 100%;
		margin-top: 10rpx;
		font-size: 26rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
	}
	.one-goods-title .t-red{
		color: #BC3D40;
	}
	.one-goods-title .t-gray{
		color: #999999;
		text-decoration: line-through;
	}
	.one-goods .one-goods-btn{
		margin-top: 10rpx;
		width: 114rpx;
		height: 34rpx;
		border: 2rpx solid #B72E32;
		font-size: 24rpx;
		color: #B72E32;
		border-radius: 2rpx;
		text-align: center;
		line-height: 32rpx;
	}
	
	.vip-swiper{
		height: 840rpx;
		margin: 0 20rpx;
		padding: 20rpx 20rpx 0;
		background-color: #FFFFFF;
		border-radius: 30rpx;
	}
</style>
